package com.homework.ch0123;
import java.util.Scanner;
public class CalculateDay {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入年 月 日：");
        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();
        scanner.close();//关闭流
        int[] days = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
            days[1] = 29;
        }

        int total = 0;
        for (int i = 0; i < month - 1; i++) {
            total += days[i];
        }
        total += day;

        System.out.println(total);
    }
}
